// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Copyright (c) KALEIDOS INC

@use "ds/_sizes.scss" as *;
@use "ds/typography.scss" as t;
@use "ds/_borders.scss" as *;
@use "ds/_utils.scss" as *;
@use "refactor/common-refactor.scss" as deprecated;
@use "../../../sidebar/common/sidebar.scss" as sidebar;

.shadow-element {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
  position: relative;

  &:hover {
    --reorder-icon-visibility: visible;
  }

  &.dnd-over-top {
    --reorder-top-display: block;
  }

  &.dnd-over-bot {
    --reorder-bottom-display: block;
  }
}

.shadow-basic {
  @include sidebar.option-grid-structure;
}

.shadow-basic-info {
  grid-column: span 6;
  display: flex;
  align-items: center;
  gap: px2rem(1);
}

.shadow-basic-button {
  border-radius: $br-8 0 0 $br-8;

  &.selected {
    --button-bg-color: var(--color-background-quaternary);
    --button-fg-color: var(--color-accent-primary);
  }

  &:disabled {
    border: $b-1 solid var(--color-background-quaternary);
  }
}

.shadow-basic-select {
  flex-grow: 1;
  border-radius: 0 $br-8 $br-8 0;
}

.shadow-basic-actions {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: span 2;
}

.shadow-advanced {
  @include sidebar.option-grid-structure;
}

.shadow-advanced-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
}

.shadow-advanced-offset-x,
.shadow-advanced-blur,
.shadow-advanced-spread,
.shadow-advanced-offset-y {
  // TODO remove this input by changing the input to DS component
  @extend .input-element;
  @include t.use-typography("body-small");
  .shadow-advanced-label {
    padding-inline-start: var(--sp-s);
    inline-size: px2rem(60);
  }
}

.shadow-advanced-offset-x {
  grid-column: span 2;
}

.shadow-advanced-blur {
  grid-column: span 3;
}

.shadow-advanced-spread {
  grid-column: span 3;
}

.shadow-advanced-offset-y {
  grid-column: span 2;
}

.shadow-advanced-color {
  grid-column: span 6;
}
